#ifndef NR_DEVICE_TYPE_MANAGER_H
#define NR_DEVICE_TYPE_MANAGER_H

#include "nr_device_type.h"
#include "nr_io_manager.h"

class nr_device_type_manager : public nr_object
{
public:
    nr_device_type_manager(nr_io_manager &io_manager);
    ~nr_device_type_manager();
    
    nr_error_t load();
    nr_error_t unload();

    nr_device_types& device_types() { return m_device_types; }

    nr_device_type* get_device_type(const nr_id_t &type_id);

    nr_error_t save_as_xml(const QString& xml_file);

private:
    nr_device_types m_device_types;
    bool m_is_loaded;

    nr_io_manager &m_io_manager;
};

#endif // NR_DEVICE_TYPE_MANAGER_H
